import Vue from 'vue';
import Router from 'vue-router';
import FoodType from '@/components/FoodType';
import FoodTypeEditor from '@/components/FoodTypeEditor';
import Foods from '@/components/Foods';
import FoodsEditor from '@/components/FoodsEditor';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'foodType',
      component: FoodType,
    }, {
      path: '/food_type_editor',
      name: 'foodTypeEditor',
      component: FoodTypeEditor,
    }, {
      path: '/foods',
      name: 'foods',
      component: Foods,
    }, {
      path: '/foods_editor/:id?',
      name: 'foodsEditor',
      component: FoodsEditor,
    },
  ],
});
